`timescale 1ns/1ns

module tb_decoder();

//声明变量
reg in_1;
reg in_2;
reg in_3;

wire [7:0] out;

//初始化
initial 
    begin
        in_1 <= 1'b0;
        in_2 <= 1'b0;
        in_3 <= 1'b0;
    end

//产生随机信号
always #10 in_1 <= {$random} % 2;
always #10 in_2 <= {$random} % 2;
always #10 in_3 <= {$random} % 2;

//调用一些系统函数，进行观察
initial
    begin
        $timeformat(-9,0,"ns",6);
        $monitor("@time %t:in_1=%b in_2=%b sel=%b out=%b", $time,in_1,in_2,sel,out);
    end


//实例化
decoder decoder_inst
(
    .in_1(in_1),
    .in_2(in_2),
    .in_3(in_3),

    .reg(reg)
);


endmodule